/**
 * @ClassName Test06
 * @Description 递归求：输入1729 输出1+7+2+9的和19
 * @Author 李明忠
 * @Date 2025/5/14 21:29
 * @Version 1.0
 */
public class Test06 {
    public static int fun(int num) {
        if (num < 10) {
            return num;
        }
        return num % 10 + fun(num / 10);
    }
    public static void main(String[] args) {
        System.out.println(fun(1729));
    }
}
